
def is_empty(value):
    if value is None:
        return True
    if type(value) == str:
        return len(value.rstrip()) == 0
    return len(value) == 0

def is_not_empty(value):
    return not is_empty(value)
    # return bool(value)  # None、{}、[]、0 → False
